SUBDIRS = wx
bin_PROGRAMS = lmule

DEFS = -DHAVE_CONFIG_H -D__GSOCKET_STANDALONE__

EXTRA_DIST = strings.en *.h pixmaps bitmaps

LIBS = -Lwx/xrc -lxrc @LIBS@
lmule_SOURCES = AddFriend.cpp \
	animate.cpp \
	BarShader.cpp \
	BaseClient.cpp \
	CFile.cpp \
	ChatWnd.cpp \
	ClientCredits.cpp \
	ClientDetailDialog.cpp \
	ClientList.cpp \
	ClientUDPSocket.cpp \
	CMuleNotebookBase.cpp \
	ColorFrameCtrl.cpp \
	CommentDialog.cpp \
	CommentDialogLst.cpp \
	DirectoryTreeCtrl.cpp \
	DownloadClient.cpp \
	DownloadListCtrl.cpp \
	DownloadQueue.cpp \
	ED2KLink.cpp \
	EditServerListDlg.cpp \
	eggtrayicon.c \
	EMSocket.cpp \
	emule.cpp \
	emuleDlg.cpp \
	FileDetailDialog.cpp \
	filemem.cpp \
	Friend.cpp \
	FriendList.cpp \
	FriendListCtrl.cpp \
	gtk2-funcs.c \
	gtkplugxembed.c \
	HTTPDownloadDlg.cpp \
	ini2.cpp \
	IPFilter.cpp \
	KnownFile.cpp \
	KnownFileList.cpp \
	listctrl.cpp \
	ListenSocket.cpp \
	MD5Sum.cpp \
	mmMultiButton.cpp \
	MuleListCtrl.cpp \
	MuleNotebook.cpp \
	muuli_wdr.cpp \
	OScopeCtrl.cpp \
	otherfunctions.cpp \
	packets.cpp \
	PartFile.cpp \
	PPgConnection.cpp \
	PPgDirectories.cpp \
	PPgFiles.cpp \
	PPgGeneral.cpp \
	PPgIrc.cpp \
	PPgNotify.cpp \
	PPgServer.cpp \
	PPgStats.cpp \
	PPgTweaks.cpp \
	Preferences.cpp \
	PreferencesDlg.cpp \
	Preview.cpp \
	QueueListCtrl.cpp \
	resource.cpp \
	SafeFile.cpp \
	SearchDlg.cpp \
	SearchList.cpp \
	SearchListCtrl.cpp \
	server.cpp \
	ServerList.cpp \
	ServerListCtrl.cpp \
	ServerSocket.cpp \
	ServerWnd.cpp \
	SharedFileList.cpp \
	SharedFilesCtrl.cpp \
	SharedFilesWnd.cpp \
	sockets.cpp \
	SplitterControl.cpp \
	StatisticsDlg.cpp \
	SysTray.cpp \
	TabCtrl.cpp\
	TransferWnd.cpp \
	treebasc.cpp \
	treectlc.cpp \
	UDPSocket.cpp \
	UploadClient.cpp \
	UploadListCtrl.cpp \
	UploadQueue.cpp \
	WebServer.cpp \
	WebSocket.cpp \
	Wizard.cpp \
	XBMDraw.cpp

#### add these if you wish to try web stuff
#	WebSocket.cpp WebSocket.h 
#	WebServer.cpp WebServer.h 

# implementation

SUFFIXES=.cpp .c .cpp

.c.cpp :
	$(CC) $(GTK_CFLAGS) $(DEFS) -c $<

.cpp.cpp :
	$(CXX) $(GTK_CFLAGS) -I. $(DEFS) -c `$(WX_CONFIG_PATH) --cxxflags` $<

libxrc:
	@cd wx/xrc && $(MAKE)

# Special Exceptions

listctrl.cpp:
	$(CXX) $(INCLUDES) $(GTK_CFLAGS) $(DEFS) -c `$(WX_CONFIG_PATH) --cxxflags` listctrl.cpp

MuleNotebook.cpp:
	$(CXX) $(INCLUDES) $(GTK_CFLAGS) $(DEFS) -c `$(WX_CONFIG_PATH) --cxxflags` MuleNotebook.cpp

SysTray.cpp:
	$(CXX) $(INCLUDES) $(GTK_CFLAGS) $(DEFS) -I. -c `$(WX_CONFIG_PATH) --cxxflags` SysTray.cpp

all: $(bin_PROGRAMS)

#$(bin_PROGRAMS): libxrc $(OBJECTS)
#	$(CXX) -o $(bin_PROGRAMS) $(OBJECTS) $(GTK_LIBS) `$(WX_CONFIG_PATH) --libs` $(LIBS) #-Lwx/xrc -lxrc

clean: 
	@cd wx/xrc && $(MAKE) clean
	rm -f *.o
